<?php
	$con = new mysqli("127.0.0.1","root","1982418781");
		if($con->connect_error)
		{
			die("lost:".$con->connect_error);
		}
		mysqli_select_db($con,'china');
		mysqli_query($con,"set names utf8");
		
	$count=$_GET['divcount'];
    $arr = array();
    $i=0;
    $sql="select name,brief,grownhabit,skill,distribution,efficacy,worth from agricul limit $count,3";
    $result = mysqli_query($con,$sql);
    while($row=mysqli_fetch_assoc($result)){
        //var_dump($row);
        $arr[$i++]=$row;
        // echo "<br>name:";
        // print_r($row['name']);
        // echo "<br>brief:";
        // print_r($row['brief']);
        // echo "<br>grownhabit:";
        // print_r($row['grownhabit']);
        // echo "<br>efficacy:";
        // print_r($row['efficacy']);
        // echo "<br>worth:";
        // print_r($row['worth']);
    }
    echo json_encode($arr);
?>